package com.example.qxfw.qhtztj.controller;
import com.example.qxfw.common.SysResult;
import com.example.qxfw.common.util.FastjsonUtil.test;
import com.example.qxfw.qhtztj.entity.AnomalyData;
import com.example.qxfw.qhtztj.service.AnomalyDataService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Chery
 * @date 2025/01/16
 */
@CrossOrigin
@RestController
@RequestMapping(value = "/anomalyData")
public class AnomalyDataController {
    @Autowired
    private AnomalyDataService anomalyDataService;
    @ApiOperation("获取气候数据")
    @GetMapping("/getClimaticData")
    public SysResult getClimaticData(AnomalyData anomalyData){
        return SysResult.success(anomalyDataService.getClimaticData(anomalyData));
    }
    /***
     * 得到单个站点的气候特征统计信息
     * @param anomalyData
     * @return
     */
    @ApiOperation("得到单个站点的气候特征统计信息")
    @GetMapping("/getMsgClimaticCharacteristicsData")
    public SysResult getMsgClimaticCharacteristicsData(AnomalyData anomalyData) {
        return SysResult.success(anomalyDataService.getMsgClimaticCharacteristicsData(anomalyData));
    }


}
